
namespace WooEngine.Common
{
    public static class Endian
    {
        public static short SapInt16(this short n)
        {
            return (short)(((n & 0xff) << 8) | ((n >> 8) & 0xff));
        }

        public static int SapInt32(this int n)
        {
            return (int)((SapInt16((short)n) & 0xffff << 0x10) | (SapInt16((short)(n >> 0x10)) & 0xffff));
        }


    }
}